<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ajax</title>
    <script src="../../js/jquery.1.8.3.min.js"></script>
    <script>
        $(function () {
            $("#btn1").click(function () {
                $.getJSON("http://127.0.0.1:63342/jquery/html/json/qdd.json",function (json) {
                    alert("JSON Data:" + json.name)
                });
            });

            $("#btn2").click(function () {
                $.getJSON("http://127.0.0.1:63342/jquery/html/json/users.json",function (json) {
                    alert("JSON Data:" + json[1].name)
                });
            });
        })
    </script>
</head>
<body>
    <button id="btn1">获取qdd数据</button>
    <button id="btn2">获取users数据</button>
</body>
</html>